package com.chance.cc.crawler.prod.command.trigger.domain.news.ocn;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.news.ocn.module.OcnChanJingTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.ocn.module.OcnTouZiTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @Author Zhao.Hhuan
 * @Date Create in 2021/6/21 17:21
 * @Description
 *      中投网
 **/
public class OcnCommonCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {
    public static void main(String[] args) {
//        publishOcnTouZiTraceCrawlerScheduleTriggerInfo();
        publishOcnChanJingTraceCrawlerScheduleTriggerInfo();
    }

    public static void publishOcnTouZiTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = OcnTouZiTraceCrawlerSchedulerJob.crawlerSchedulejob();

        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                OcnTouZiTraceCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 10 4 * * ?",
                "中投网投资板块凌晨四点10分"
        );
    }

    public static void publishOcnChanJingTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = OcnChanJingTraceCrawlerSchedulerJob.crawlerSchedulejob();

        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                OcnChanJingTraceCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 10 4 * * ?",
                "中投网产经板块凌晨四点10分"
        );
    }
}
